{extend name="layout_modal" /}
{block name="content"}
<section class="content" style="padding-top:0px;">
    <div class="row">
        <div class="box">
            <form role="form" action="{:url('data_update')}">
                <div class="box-body">
                    <div class="form-group">
                        <label for="exampleInputEmail1">优惠券标题</label>
                        <input type="text" class="form-control" placeholder="请输入优惠券标题" name="name" value="{$info.name}"
                            {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">商品图片</label>
                        <div class="input-group input-group-sm">
                            <input type="text" class="form-control" name="image" id="image_text" value="{$info.image}" {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                            {if condition="$info.auditstatus == 2"}
                            <span class="input-group-btn">
                                <input id="image" class="upload_picker" type="file" btnTxt="上传图片">
                            </span>
                            {/if}
                        </div>
                        <div id="queue_image"></div>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">优惠券分类</label>
                        {if condition="$info.auditstatus == 2"}
                        <select class="form-control" name="type">
                            <option value="">请选择</option>
                            {volist name=":config('COUPONS_TYPE')" id="v"}
                                <option value="{$key}" {eq name="$info.type" value="$key"} selected {/eq}>{$v}</option>
                            {/volist}
                        </select>
                        {else /}
                            <input class="form-control" value="{$info.type}" {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                        {/if}
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">核销类型(该通用券应由哪类总监进行核销)</label>
                        {if condition="$info.auditstatus == 2"}
                        <select class="form-control" name="canceltype">
                            <option value="">请选择</option>
                            {volist name=":config('HEXIAO_TYPE')" id="v"}
                                <option value="{$key}" {eq name="$info.canceltype" value="$key"} selected {/eq}>{$v}</option>
                            {/volist}
                        </select>
                        {else /}
                            <input class="form-control" value="{$info.canceltype}" {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                        {/if}
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">折扣类别</label>
                        <input type="radio" name="distype" value="1" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.distype" value="1"} checked {/eq}> 人民币
                        <input type="radio" name="distype" value="2" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.distype" value="2"} checked {/eq}> 折扣
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">折扣价格</label>
                        <input type="text" class="form-control" placeholder="请输入折扣价格，如：9(九折)，100(元)。与折扣类别对应" name="price" value="{$info.price}"
                        {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">描述</label>
                        <input type="text" class="form-control" placeholder="请输入优惠券描述" name="desc" value="{$info.desc}"
                        {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                    </div> 
                    <div class="form-group">
                        <label for="exampleInputEmail1">使用说明</label>
                        <input type="text" class="form-control" placeholder="请输入优惠券的使用说明" name="tip" value="{$info.tip}"
                        {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                    </div> 
                    <div class="form-group">
                        <label for="exampleInputEmail1">有效天数</label>
                        <input type="text" class="form-control" placeholder="请输入有效天数" name="validdays" value="{$info.validdays}"
                        {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">开始发券时间</label>
                        <input type="text" class="form-control date" placeholder="无弹窗日期选择框，请按照2000-01-01输入" name="opentime" 
                        value="{:date('Y-m-d', $info.opentime)}" {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">结束发券时间</label>
                        <input type="text" class="form-control date" placeholder="无弹窗日期选择框，请按照2000-01-01输入" name="closetime" 
                        value="{:date('Y-m-d', $info.closetime)}" {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">生效时间</label>
                        <input type="text" class="form-control date" placeholder="无弹窗日期选择框，请按照2000-01-01输入" name="starttime" 
                        value="{:date('Y-m-d', $info.starttime)}" {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">失效时间</label>
                        <input type="text" class="form-control date" placeholder="无弹窗日期选择框，请按照2000-01-01输入" name="endtime" 
                        value="{:date('Y-m-d', $info.endtime)}" {eq name="$info.auditstatus" value="1"} readonly {/eq}>
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">是否可转赠</label>
                        <input type="radio" name="isgive" value="1" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.isgive" value="1"} checked {/eq}> 可以
                        <input type="radio" name="isgive" value="0" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.isgive" value="0"} checked {/eq}> 不可以
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">购买会员赠送</label>
                        <input type="radio" name="isbuyvip" value="0" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.isbuyvip" value="0"} checked {/eq}> 否
                        <input type="radio" name="isbuyvip" value="1" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.isbuyvip" value="1"} checked {/eq}> 是
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">有效期和会员相同(如果选择‘是’，则上边的‘失效时间’设置无效)</label>
                        <input type="radio" name="isrelyvip" value="0" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.isrelyvip" value="0"} checked {/eq}> 否
                        <input type="radio" name="isrelyvip" value="1" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.isrelyvip" value="1"} checked {/eq}> 是
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">累计使用</label>
                        <input type="radio" name="usemore" value="0" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.usemore" value="0"} checked {/eq}> 不可以
                        <input type="radio" name="usemore" value="1" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.usemore" value="1"} checked {/eq}> 可以
                    </div>
                    <div class="form-group">
                        <label for="exampleInputEmail1">状态</label>
                        <input type="radio" name="status" value="1" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.status" value="1"} checked {/eq}> 显示
                        <input type="radio" name="status" value="0" style="margin-left: 15px;" {eq name="$info.auditstatus" value="1"} disabled {/eq} {eq name="$info.status" value="0"} checked {/eq}> 隐藏
                    </div>
                    <input type="hidden" name="id" value="{$info.id}">
                </div>
            </form>
        </div>
    </div>
</section>
{/block}